getButton = () => {
    var prefabIndex = 0;
    for (var i = 0; i < global.UnityNode.length; i++) {
        var d = global.UnityNode[i];
        if (d.CCButton.Add) {
            var nodeId = d.ID;
            prefabIndex++;
            global.curID++;
            global.finialInfo.push(addButton(nodeId));
        }
    }
}
addButton= (nodeId) => {
    var d = {
        "__type__": "cc.Button",
        "_name": "",
        "_objFlags": 0,
        "node": {
          "__id__": nodeId
        },
        "_enabled": true,
        "_normalMaterial": null,
        "_grayMaterial": null,
        "duration": 0.1,
        "zoomScale": 1.2,
        "clickEvents": [],
        "_N$interactable": true,
        "_N$enableAutoGrayEffect": false,
        "_N$transition": 3,
        "transition": 3,
        "_N$normalColor": {
          "__type__": "cc.Color",
          "r": 255,
          "g": 255,
          "b": 255,
          "a": 255
        },
        "_N$pressedColor": {
          "__type__": "cc.Color",
          "r": 211,
          "g": 211,
          "b": 211,
          "a": 255
        },
        "pressedColor": {
          "__type__": "cc.Color",
          "r": 211,
          "g": 211,
          "b": 211,
          "a": 255
        },
        "_N$hoverColor": {
          "__type__": "cc.Color",
          "r": 255,
          "g": 255,
          "b": 255,
          "a": 255
        },
        "hoverColor": {
          "__type__": "cc.Color",
          "r": 255,
          "g": 255,
          "b": 255,
          "a": 255
        },
        "_N$disabledColor": {
          "__type__": "cc.Color",
          "r": 124,
          "g": 124,
          "b": 124,
          "a": 255
        },
        "_N$normalSprite": null,
        "_N$pressedSprite": null,
        "pressedSprite": null,
        "_N$hoverSprite": null,
        "hoverSprite": null,
        "_N$disabledSprite": null,
        "_N$target": null,
        "_id": ""
    }
    if (global.isShowId) d["ID"] = global.curID;
    return d;
}
module.exports = {
  getButton,
};